<template>
  <el-container id="biaotou">

    <el-header>待支付挂号</el-header>
    <el-main>
      <el-table :data="toBePaidData" height="150" style="width: 100%">
        <el-table-column prop="registrationOffice" label="科室" width="180"/>
        <el-table-column prop="registrationDoctorId" label="医生" width="180"/>
        <el-table-column prop="registrationSickId" label="患者"/>
        <el-table-column prop="registrationInquiryTime" label="日期" width="180"/>
      </el-table>
    </el-main>

    <el-header>未支付挂号</el-header>
    <el-main>
      <el-table :data="unPaidData" height="150" style="width: 100%">
        <el-table-column prop="registrationOffice" label="科室" width="180"/>
        <el-table-column prop="registrationDoctorId" label="医生" width="180"/>
        <el-table-column prop="registrationSickId" label="患者"/>
        <el-table-column prop="registrationInquiryTime" label="日期" width="180"/>
      </el-table>
    </el-main>

    <el-header>未就诊挂号</el-header>
    <el-main>
      <el-table :data="unSeeDoctorData" height="150" style="width: 100%">
        <el-table-column prop="registrationOffice" label="科室" width="180"/>
        <el-table-column prop="registrationDoctorId" label="医生" width="180"/>
        <el-table-column prop="registrationSickId" label="患者"/>
        <el-table-column prop="registrationInquiryTime" label="日期" width="180"/>
      </el-table>
    </el-main>

    <el-header>已就诊挂号</el-header>
    <el-main>
      <el-table :data="endSeeDoctorData" height="250" style="width: 100%">
        <el-table-column prop="registrationOffice" label="科室" width="180"/>
        <el-table-column prop="registrationDoctorId" label="医生" width="180"/>
        <el-table-column prop="registrationSickId" label="患者"/>
        <el-table-column prop="registrationInquiryTime" label="日期" width="180"/>
      </el-table>
    </el-main>

  </el-container>
</template>

<script>
import request from "@/utils/request";

export default {
  data() {
    return {
      //未就诊
      unSeeDoctorData:[],
      //已就诊
      endSeeDoctorData:[],
      //未支付
      unPaidData:[],
      //待支付
      toBePaidData:[]
    };
  },
  created() {
    this.getasas();
  },
  methods: {

    getasas(){
      this.unSeeDoctor();
      this.endSeeDoctor();
      this.unPaid();
    },
    //未就诊
    unSeeDoctor() {
      return request({
        url: '/lha/registration/unSeeDoctor',
        method: 'get'
      }).then(res => {
        console.log(1)
        console.log(res)
        this.unSeeDoctorData=res.data
      }).catch()
    },
    //已就诊
    endSeeDoctor() {
      return request({
        url: '/lha/registration/endSeeDoctor',
        method: 'get'
      }).then(res => {
        console.log(2)
        console.log(res)
        this.endSeeDoctorData=res.data
      }).catch()
    },
    //待支付
    toBePaid() {
      return request({
        url: '/lha/registration/unpaid',
        method: 'post',
        data:{
          state:0,
          verifykey:sessionStorage.getItem("rediskey")
        }
      }).then(res => {
        console.log(3)
        console.log(res)
        this.toBePaidData=res.data
      }).catch()
    },
    //未支付
    unPaid() {
      return request({
        url: '/lha/registration/unPaid',
        method: 'get',
      }).then(res => {
        console.log(4)
        console.log(res)
        this.unPaidData=res.data
      }).catch()
    },
  }
};
</script>

<style lang="less" scoped>
.el-main {
  background-color: #E9EEF3;
  color: #333;
  text-align: center;
  line-height: 160px;
}
.el-header{
  background-color: #f5f9fd;
  color: #333;
  text-align: center;
  line-height: 60px;
}
#biaotou {
  width: 100%;
  height: 100%;
  /deep/ .el-table__header tr,
  //修改th表头高度
  .el-table__header th {
    padding: 0;
    height: 30px;
    line-height: 30px;
  }
  /deep/ .el-table__body tr,
  .el-table__body td {//修改td单元格高度
  padding: 0;
  height: 30px;
  line-height: 30px;
  }
}
</style>
